﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using AutoTest.Domain;
using Microsoft.IdentityModel.Tokens;

namespace AutoTest.Business.Options
{
    /// <summary>
    /// JWT配置
    /// </summary>
    public class JwtOption : IDbOption
    {
        /// <summary>
        /// token的颁发者
        /// </summary>
        [OptionDescription("token的颁发者")]
        public string Issuer { get; set; } = "AutoTestApp";
        /// <summary>
        /// token接收者
        /// </summary>
        [OptionDescription("token接收者")]
        public string Audience { get; set; } = "AutoTest";

        /// <summary>
        /// 用于颁布token的秘钥
        /// </summary>
        [OptionDescription("用于颁布token的秘钥")]
        public string SecurityKey { get; set; } = "yYIlwOf4YjCiqFMKCLmxKGGB9nBLlA0l";

        /// <summary>
        /// 过期时间（单位分钟）
        /// </summary>
        [OptionDescription("过期时间（单位分钟）")]
        public int ExpireMinutes { get; set; } = 30;

        /// <inheritdoc />
        [OptionDescription("", Ignore = true)]
        public string OptionKey => AppConsts.APPSETTING_JWT;

    }
}
